<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<base href="<%=basePath%>" />
		<title>主界面</title>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
	<link rel="stylesheet" href="css/main_date.css" type="text/css"></link>
	</head>
	
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top" background="images/main_17.gif"><br />
      <table width="95%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/main_24.gif" width="97" height="11" /></td>
        </tr>
      </table>
        <br />
        <table width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5"><img src="images/main_11.gif" width="5" height="5" /></td>
            <td background="images/main_12.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            <td width="5"><img src="images/main_14.gif" width="5" height="5" /></td>
          </tr>
          <tr>
            <td background="images/main_19.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            <td align="center" class="td01"><table width="95%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="25" align="left"><img src="images/main_28.gif" width="9" height="9" /> <strong>公告</strong></td>
                  <td width="35" align="right"><a href="seeProclaim"><img src="images/main_53.gif" width="35" height="9" border="0" /></a></td>
                </tr>
                <tr>
                  <td height="1" class="td05"><img src="images/spacer.gif" width="1" height="1" /></td>
                  <td class="td05"><img src="images/spacer.gif" width="1" height="1" /></td>
                </tr>
                <tr>
                  <td height="5"><img src="images/spacer.gif" width="1" height="1" /></td>
                  <td><img src="images/spacer.gif" width="1" height="1" /></td>
                </tr>
              </table>
                <table width="95%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="120"><img src="images/info_62.gif" width="104" height="76" /></td>
                    <td>
	                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	                    	<s:if test="proclaims.size==0">
		                    	<tr>
		                          <td valign="top" align="center" colspan="3" style="color:gray">暂无有效公告</td>
		                        </tr>
		                    </s:if><s:else>
		                    <s:iterator value="proclaims">
		                        <tr>
		                          <td width="3%"><img src="images/index_57.gif" width="15" height="16"/></td>
		                          <td valign="top" width="50%" class="td08" align="left"><a href="getDetail?id=<s:property value="id"/>"><s:property value="title" /></a></td>
		                          <td valign="top" width="47%" class="td08" align="left"><s:date format="yyyy-MM-dd" name="createtime"/></td>
		                        </tr>
		                     </s:iterator></s:else>
	                    </table>
                    </td>
                  </tr>
                </table><br/>
                </td>
            <td background="images/main_21.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
          </tr>
          <tr>
            <td><img src="images/main_34.gif" width="5" height="5" /></td>
            <td background="images/main_35.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
            <td><img src="images/main_36.gif" width="5" height="5" /></td>
          </tr>
        </table><br/>
        <table width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5"><img src="images/main_11.gif" width="5" height="5" /></td>
            <td background="images/main_12.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            <td width="5"><img src="images/main_14.gif" width="5" height="5" /></td>
          </tr>
          <tr>
            <td background="images/main_19.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            <td align="center" class="td01"><table width="95%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="25" align="left"><img src="images/main_28.gif" width="9" height="9" /> <strong>未读信息</strong></td>
                  <td width="35" align="right"><a href="message.jsp"><img src="images/main_53.gif" width="35" height="9" border="0" /></a></td>
                </tr>
                <tr>
                  <td height="1" class="td05"><img src="images/spacer.gif" width="1" height="1" /></td>
                  <td class="td05"><img src="images/spacer.gif" width="1" height="1" /></td>
                </tr>
                <tr>
                  <td height="5"><img src="images/spacer.gif" width="1" height="1" /></td>
                  <td><img src="images/spacer.gif" width="1" height="1" /></td>
                </tr>
              </table>
                <table width="95%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="120"><img src="images/info_62.gif" width="104" height="76" /></td>
                    <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	                    <s:if test="noReadMessages.size==0">
	                    	<tr>
	                          <td valign="top" align="center" colspan="3" style="color:gray">暂无未读的消息</td>
	                        </tr>
	                    </s:if><s:else>
	                    <s:iterator value="noReadMessages">
	                        <tr>
	                          <td width="3%"><img src="images/index_57.gif" width="15" height="16"/></td>
	                          <td valign="top" width="50%" class="td08" align="left">发件人：<a href="doReadMessage?mid=<s:property value='mesId'/>"><s:property value="employeeBySendId.userName"/></a></td>
	                          <td valign="top" width="47%"  class="td08" align="left"><s:date name="sendTime" format="yyyy-MM-dd" /></td>
	                        </tr>
	                     </s:iterator></s:else>
	                  </table></td>
                  </tr>
                </table>
                <br /></td>
            <td background="images/main_21.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
          </tr>
          <tr>
            <td><img src="images/main_34.gif" width="5" height="5" /></td>
            <td background="images/main_35.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
            <td><img src="images/main_36.gif" width="5" height="5" /></td>
          </tr>
        </table>
    <br /></td>
    <td width="1" valign="top" background="images/main_41.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
    <td width="190" align="center" valign="top" background="images/main_17.gif"><br />
      <table width="163" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="25"><img src="images/main_30.gif" width="9" height="9" align="absmiddle" /> <strong>个人信息</strong></td>
        </tr>
      </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="5"><img src="images/main_65.gif" width="5" height="5" /></td>
              <td background="images/main_66.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
              <td width="5"><img src="images/main_69.gif" width="5" height="5" /></td>
            </tr>
            <tr>
              <td background="images/main_70.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
              <td class="td06"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                  <tr>
                    <td>${loginUser.userName}&nbsp;&nbsp;&nbsp;&nbsp;您好！<br/><br/>
                     	 欢迎使用EasyJob-OA系统<br/><br/>
                    </td>
                  </tr>
              </table></td>
              <td background="images/main_72.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
            </tr>
            <tr>
              <td><img src="images/main_80.gif" width="5" height="5"/></td>
              <td background="images/main_81.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
              <td><img src="images/main_82.gif" width="5" height="5"/></td>
            </tr>
          </table>
          <br />
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="25"><img src="images/main_61.gif" width="9" height="9" align="absmiddle"/> <strong>日历</strong></td>
            </tr>
            <tr>
              <td><table border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
                  <tr>
                    <td bgcolor="#FFFFFF">
 <script language="JavaScript">
var now = new Date();
var month_array = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
document.write("<form name=date_list><table bgcolor=white border=0><tr><td>");
document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");
for(i=0;i<month_array.length;i++)
{
 if (now.getMonth() != i)
 {document.write ("<option value="+i+">"+month_array[i]);}
 else
 {document.write ("<option value="+i+" selected>"+month_array[i]);}

}
document.write("</select>");
document.write("</td><td>");
document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>");
for(i=1950;i<3000;i++)
{
 if (now.getYear() != i)
 {document.write("<option value="+i+">"+i);}
 else
 {document.write("<option value="+i+" selected>"+i);}
}
document.write("</select></td></tr><tr><td colspan=2><center>");

document.write("<table bgcolor=white border=0 cellspacing = 1 cellpading = 0 width=100%><tr bgcolor=666666 align=center>");
document.write("<td heigh=25 width=19 class=F02>M</td><td width=19 class=F02>T</td><td width=19 class=F02>W</td><td width=19 class=F02>T</td><td width=19 class=F02>F</td><td width=19 class=F03>S</td><td width=19 class=F03>S</td>");
document.write("</tr><tr>");
for(j=0;j<6;j++)
{
 for(i=0;i<7;i++)
 {
   document.write("<td bgcolor=EFEFEF align=center id=d"+i+"r"+j+"></td>")
 }
 document.write("</tr>");
}

document.write("</table>");

document.write("</center></from></td></tr></table>");

var show_date = new Date();

function set_cal(show_date)
{
begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);
count_day = (end_day - begin_day)/1000/60/60/24;
input_table(begin_day_date,count_day);
}
set_cal(show_date);

function input_table(begin,count)
{
init();
j=0;
if (begin!=0){i=begin-1;}else{i=6}
for (c=1;c<count+1;c++)
{
 colum_name = eval("d"+i+"r"+j);
 if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getYear() == now.getYear())) {colum_name.style.backgroundColor = "FF7700";colum_name.style.color = "white";};
 colum_name.innerText =  c;
 i++;
 if (i==7){i=0;j++;}
}
}

function init()
{
for(j=0;j<6;j++)
{
 for(i=0;i<7;i++)
 {
 colum_name = eval("d"+i+"r"+j);
 colum_name.innerText =  " ";
 colum_name.style.backgroundColor ="";
 colum_name.style.color ="";
 }
}
}

function change_month(sel_month)
{
show_date = new Date(show_date.getYear(),sel_month,1);
set_cal(show_date);
}

function change_year(sel_year)
{
sel_year = sel_year.value;
show_date = new Date(sel_year,show_date.getMonth(),1);
set_cal(show_date);
}
          </script></td>
                  </tr>
              </table></td>
            </tr>
          </table>  
          <br />
          <br />
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="1" background="images/main_57.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            </tr>
          </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="50" height="50"><img src="images/icon_37.gif" width="36" height="36"/></td>
              <td><a href="pageByGroupId" target="mainFrame" class="a03">个人通讯录</a><br />
              <img src="images/main_50.gif" width="43" height="9"/></td>
            </tr>
          </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="1" background="images/main_57.gif"><img src="images/spacer.gif" width="1" height="1" /></td>
            </tr>
          </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="50" height="50"><img src="images/icon_38.gif" width="36" height="36"/></td>
              <td><a href="getEmpInf" class="a03">个人信息</a><br />
                  <img src="images/main_50.gif" width="43" height="9"/></td>
            </tr>
    	</table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="1" background="images/main_57.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
            </tr>
          </table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="50" height="50"><img src="images/icon_38.gif" width="36" height="36" /></td>
              <td><a href="toSchedule" class="a03">日程管理</a><br />
                  <img src="images/main_50.gif" width="43" height="9"/></td>
            </tr>
    	</table>
          <table width="163" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="1" background="images/main_57.gif"><img src="images/spacer.gif" width="1" height="1"/></td>
            </tr>
          </table>
          </td>
  </tr>
</table>
</body>
</html>
